package cmpe451.group7.ourcity.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Entity class for tags.
 */
@Entity
@Table(uniqueConstraints = @UniqueConstraint(columnNames = { "tag1_mID",
		"tag2_mID" }))
public class TagSimilarity implements Serializable {

	private static final long serialVersionUID = 1L;
	public static final double DEFAULT_SIMILARITY_VALUE = 5.0;

	private long id;
	private String tag1_mID;
	private String tag2_mID;
	private double similarity;

	public TagSimilarity() {
		this(null, null, 0);
	}

	public TagSimilarity(String tag1_mID, String tag2_mID, double similarity) {
		this.tag1_mID = tag1_mID;
		this.tag2_mID = tag2_mID;
		this.similarity = similarity;
	}

	public String getTag1_mID() {
		return tag1_mID;
	}

	public void setTag1_mID(String tag1_mID) {
		this.tag1_mID = tag1_mID;
	}

	public String getTag2_mID() {
		return tag2_mID;
	}

	public void setTag2_mID(String tag2_mID) {
		this.tag2_mID = tag2_mID;
	}

	public double getSimilarity() {
		return similarity;
	}

	public void setSimilarity(double similarity) {
		this.similarity = similarity;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

}
